/*
 *  Copyright (c) Skrumtious
 */
package com.skrumtious.util;

/**
 * Reflection utils.
 * 
 * @author Tony
 *
 */
public class ReflectionClass {

	/**
	 * Creates an instance of the supplied class name.
	 * 
	 * @param <T>
	 * @param className
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	public static <T> T createObject(String className) throws Exception {
		Class<?> cls = Class.forName(className);		
		T result = (T)cls.newInstance();
		return result;
	}
}
